// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TaskExceptions.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Defines the TaskExceptions type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Threading
{
    using System;

    public static class TaskExceptions
   {
      public static InvalidOperationException CannotCallStartIfAlreadyStarted()
      {
         return new InvalidOperationException("Start cannot be called on a task that has already been started.");
      }

      public static InvalidOperationException CannotCallStartIfContinuation()
      {
         return new InvalidOperationException("Start cannot be called on tasks that are continuations.");
      }

      public static InvalidOperationException CannotCallContinueFromIfStarted()
      {
         return new InvalidOperationException("ContinueFrom cannot be called on a task that has already been started.");
      }

      public static InvalidOperationException CannotCallContinueFromIfAlreadyContinuation()
      {
         return new InvalidOperationException("ContinueFrom cannot be called on tasks that are already continuations.");
      }

      public static InvalidOperationException CannotCallBindIfAlreadyBound()
      {
         return new InvalidOperationException("Bind cannot be called on tasks that are already bound.");
      }
   }
}